import { post } from '../http'
// -------------------------------销售看板-----------------------------

// 获取销售看板-店铺总体指标
export const metricsByShop = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/shop/overall/metrics', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 获取销售看板-店铺看板趋势图
export const trendChartsByShop = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/shop/overall/trendCharts', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 获取店铺交易数据分页列表
export const tableListsByShop = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/shop/list', paylaod)
    .then((res) => res)
    .catch(() => false)
}

// 获取销售看板-产品总体指标
export const metricsBySku = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/product/overall/metrics', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 获取销售看板-产品总体指标
export const trendChartsBySku = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/product/overall/trendCharts', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 获取产品交易数据分页列表
export const tableListsBySku = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/product/list', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 获取销售看板-运营总体指标
export const metricsByUser = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/operations/overall/metrics', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 获取销售看板-运营总体指标
export const trendChartsByUser = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/operations/overall/trendCharts', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 获取运营交易数据分页列表
export const tableListsByUser = async (paylaod?: any) => {
  return await post('/adopr/v1/transaction/dashboard/operations/list', paylaod)
    .then((res) => res)
    .catch(() => false)
}
